package com.leetcode.Offer;

public class JZ04 {
    public boolean findNumberIn2DArray(int[][] matrix, int target) {
        for (int i = 0; i < matrix.length; i++) {
            for (int j = 0; j < matrix[0].length; j++) {
                if (matrix[i][j]==target){
                    return true;
                }else if (matrix[i][j]>target){
                    continue;
                }
            }
        }
        return false;
    }
}
